home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-serious-
/
programming
/
c
/
stormamiga_lib-v45_00d
/
include
/
sys
/
dirent.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-02-28
|
1KB
|
47 lines
#ifndef SYS_DIRENT_H
#define SYS_DIRENT_H
/*
** $VER: sys/dirent.h 1.1 (18.09.98)
** Includes Release 45.00
**
** Copyright © 1996/2000 by CyberdyneSystems
**
** written by Matthias Henze
** All Rights Reserved
*/
#ifndef STORMAMIGA_H
#include <stormamiga.h>
#endif
struct dirent {
uint d_fileno; /* file number of entry */
ushort d_reclen; /* length of this record */
uchar d_type; /* file type, see below */
uchar d_namlen; /* length of string in d_name */
#ifdef _POSIX_SOURCE
char d_name[255 + 1]; /* name must be no longer than this */
#else
#define MAXNAMLEN 255
char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */
#endif
};
/* File types */
#define DT_UNKNOWN 0
#define DT_FIFO 1
#define DT_CHR 2
#define DT_DIR 4
#define DT_BLK 6
#define DT_REG 8
#define DT_LNK 10
#define DT_SOCK 12
#define DT_WHT 14
/* Convert between stat structure types and directory types. */
#define IFTODT(mode) (((mode) & 0170000) >> 12)
#define DTTOIF(dirtype) ((dirtype) << 12)
#endif /* SYS_DIRENT_H */